package com.simpleframe.views.ui;

import javax.servlet.http.HttpServletRequest;

import com.simpleframe.views.components.Component;
import com.simpleframe.views.components.Page;


public class PageTag extends ComponentTagSupport {
	
	private static final long serialVersionUID = 2074596370942301565L;
	
	public Component getModelBean() {
		return new Page();
	}
	
	@Override
	protected void populateParameters() {
		super.populateParameters();
		Page page = (Page)component;
		HttpServletRequest request = (HttpServletRequest)pageContext.getRequest();
		page.setPage((com.simpleframe.persistence.hibernate.Page)request.getAttribute("page"));
	}
}
